//
//  AllocateDelegate.m
//  cTypica
//
//  Created by David Kavanagh on 2/14/09.
//  Copyright 2009 directThought. All rights reserved.
//

#import "AllocateDelegate.h"


@implementation AllocateDelegate
@synthesize address;

+ (id)delegate {
	AllocateDelegate *ret = [self alloc];
	return ret;
}

// XML parser delegate methods
- (void)parser: (NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {
}

- (void)parser: (NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
	NSString *cleanString = [currentStringValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
	[currentStringValue setString:@""];
	if ([elementName isEqualToString:@"publicIp"]) {
		[self setAddress:cleanString];
	}
}
@end
